<?php

/**
 * Cooperativa form.
 *
 * @package    SistemaRutasEc
 * @subpackage form
 * @author     Your name here
 * @version    SVN: $Id: sfDoctrineFormTemplate.php 23810 2009-11-12 11:07:44Z Kris.Wallsmith $
 */
class CooperativaForm extends BaseCooperativaForm {

    public function configure() {



        $this->widgetSchema['logo'] = new sfWidgetFormInputFileEditable(array(
                    'label' => 'Logo',
                    'file_src' => '/uploads/images/' . $this->getObject()->getLogo(),
                    'is_image' => true,
                    'edit_mode' => !$this->isNew(),
                    'template' => '<div>%file%<br /><label></label>%input%<br /><label></label>%delete% Eliminar imagen actual</div>',
                ));


        $this->validatorSchema['logo'] = new sfValidatorFile(array(
                    'required' => false,
                    'mime_types' => 'web_images',
                    'path' => sfConfig::get('sf_upload_dir') . '/images',
                    'validated_file_class' => 'sfResizedFile',
                ));




//        $this->widgetSchema['logo'] = new sfWidgetFormInputFileEditable(array(
//                    'label' => 'Logo Institucional</br> de la Cooperativa',
//                    'file_src' => '/uploads/sistema/images/' . $this->getObject()->getLogo(),
//                    'is_image' => true,
//                    'edit_mode' => !$this->isNew(),
//                    'template' => '<div>%file%<br /><label></label>%input%<br /><label></label>%delete% Eliminar imagen actual</div>',
//                ));
//
//        $this->validatorSchema['logo'] = new sfValidatorFile(array(
//                    'required' => false,
//                    'mime_types' => 'web_images',
//                    'path' => sfConfig::get('sf_upload_dir') . '/sistema/images',
//                ));
    }

}
